package com.bsh.serviceImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bsh.mybatis.model.Region;
import com.bsh.repository.DaoRegion;
import com.bsh.service.RegionService;

/**
 * 后台理员
 * @author gsh
 *
 */
@Service
@Transactional
public class RegionServiceImpl implements RegionService {
	@Autowired
	private DaoRegion regionDao;

	/* (non-Javadoc)
	 * @see com.bsh.serviceImpl.RegionService#getRegionList(java.lang.Integer)
	 */
	@Override
	public List<Region> getRegionList(Integer pid){
		if(pid==null)return null;
		return regionDao.getRegionList(pid);
	}
	
	@Override
	public List<Region> getRegionAllCity(Integer regionLevel){
		if(regionLevel==null)return null;
		return regionDao.getRegionAllCity(regionLevel);
	}

	@Override
	public List<Map<String, Object>> getSelectedRegion(String where) {
		return regionDao.getSelectedRegion(where);
	}
}
